package org.example.model.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author weigang
 * @create 2022-11-08 15:02
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class QueryFullUserOption {
    /**
     * 角色
     */
    @Builder.Default
    private Boolean needRole = false;

    /**
     * 菜单
     */
    @Builder.Default
    private Boolean needMenu = false;

    /**
     * 部门
     */
    @Builder.Default
    private Boolean needDept = false;

    /**
     * 团队
     */
    @Builder.Default
    private Boolean needTeam = false;

    /**
     * ldap信息
     */
    @Builder.Default
    private Boolean needLdapUser = false;

    private static QueryFullUserOption OPTION_EXCLUDE_LDAP = new QueryFullUserOptionBuilder()
            .needRole(true)
            .needMenu(true)
            .needDept(true)
            .needTeam(true)
            .needLdapUser(false)
            .build();

    private static final QueryFullUserOption ONLY_USER_OPTION = QueryFullUserOption.builder().build();


    public static QueryFullUserOption getOptionExcludeLdap() {
        return OPTION_EXCLUDE_LDAP;
    }

    public static QueryFullUserOption getOnlyUserOption() {
        return ONLY_USER_OPTION;
    }
}
